package game;

import game.event.ChatEvent;
import game.event.EventLog;
import game.event.Message;
import game.gui.GameMainGUI;

public class Game {

	public EventLog log;
	
	private GameMainGUI gui;
	private Player localPlayer;

	public Game(Player localPlayer) {
		this.localPlayer = localPlayer;
	}

	public void displayMessage(ChatEvent chatEvent) {
		gui.displayMessage(chatEvent);
	}

	public void setGUI(GameMainGUI gui) {
		this.gui = gui;
	}

	public void performLocalChat(String text) {
		ChatEvent chat = new ChatEvent(localPlayer, new Message(text));
		chat.perform(this);
	}
}
